<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>v-for中的ref绑定常量</title>
</head>

<body>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <div id="Application">
        <div :ref="setHelloRef">简简单单的晚饭</div>
    </div>
    <script>
        const App = Vue.createApp({
            setup() {
                const setHelloRef = (el) => {
                    console.log(el); // <div>简简单单的晚饭</div>
                };

                return {
                    setHelloRef,
                };
            },
        });
        App.mount("#Application");
    </script>
</body>

</html>